Objects Reference

local_system::rotate

Prototype

void rotate(vector& rot)
void rotate(float ang,vector& v);
void rotate(vector &from, vector &to, float maxang=360);

Parameters

Parameter Type Description
rot vector& rotation vector in degrees
ang float angle in degrees to rotate around vector v
v vector& vector to define rotation of angle degrees
from vector& vector to rotate from
to vector& vector to rotate to
maxang float maximum angle of rotation around cross product of from and to

Return Value

None

Remarks

This functions rotates the local_system axis and redefines the local_system matrices.
The first one, rotates rox.x around X axis, rot.y around Y axis and rot.z around Z axis.
The second one, rotates ang degrees around a vector v.
The third one, rotates from vector from to vector to, a maximum of maxang degrees. It rotates in the plane that contains the vectors from and to.